// ModifyProcTable.h : stores the variables modified in each procedure.
// Author: Achyut P Balaji
//

#ifndef MODIFY_PROC_TABLE_H
#define MODIFY_PROC_TABLE_H
#include"../../SPA_Data_Types.h"

using namespace std;

typedef vector<VAR_INDEX> VAR_LIST;

class ModifyProcTable {
private:
	
	vector<VAR_LIST> variablesModified;
	
	static ModifyProcTable *obj;
	ModifyProcTable();
	
	bool initialised;

public:
	static ModifyProcTable* getInstance();
	static ModifyProcTable* getFirstInstance();
	
	BOOLEAN addEntry(PROC_INDEX p,VAR_LIST varModified);
	
	BOOLEAN isModified(PROC_INDEX n, VAR_INDEX ind);
	VAR_LIST* getVarModified(PROC_INDEX n);
	
	void initialise();
	void initial(int size);
};


#endif